<template>
  <div class="brand-container">
    <!--导航栏-->
    <van-nav-bar class="login-nav-bar" :title="brand.name"><van-icon slot="left" name="arrow-left" @click="$router.back()" /></van-nav-bar>
    <!--内容-->
    <van-image fit="cover" :src="brand.app_list_pic_url" />
    <div class="content">
      <div class="title-box">
        <div class="tit">{{brand.name}}</div>
        <div class="price">{{brand.floor_price | RMBformat}}</div>
      </div>
      <div class="sort-order">订单排名:{{brand.sort_order}}</div>
      <div class="summary">{{brand.simple_desc}}</div>
    </div>
  </div>
</template>

<script>
import { GetBrandDetailData } from '@/request/api'
export default {
  name: 'BrandDetail',
  components: {},
  data () {
    return {
      brand: [] // 详情内容
    }
  },
  created () {
    // console.log(this.$route)
    // 发送请求
    GetBrandDetailData({
      id: this.$route.query.id
    }).then(res => {
      // 请求成功
      // console.log(res.data.brand)
      this.brand = res.data.brand
    })
  },
  methods: {
    // 点击登录
  }
}
</script>

<style scoped lang="less">
.brand-container{
  padding-top: 46px;
  .van-nav-bar{
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
  }
  .van-nav-bar .van-icon{
    color: #333;
  }
  .content{
    padding: 20px 10px 0 10px;
  }
  .title-box{
    display: flex;
    justify-content: space-between;
    .tit{
      font-size: 20px;
      font-weight: bold;
      color: #333;
    }
    .price{
      font-size: 16px;
      color: #f00;
      flex-shrink: 0;
    }
  }
  .sort-order{
    font-size: 14px;
    color: #666;
    margin-top: 10px;
  }
  .summary{
    font-size: 16px;
    color: #999;
    line-height: 26px;
    margin-top: 20px;
  }
}
</style>
